var pageNo=1;

	function _clickHandler(pageNo){
		pagen=pageNo;
		$.ajax({
		    type: "get",
		    url:"/MyArtifact/login/getUserList.action?pageNo="+pageNo,
		     contentType: "application/json;charset=UTF-8",
		    dataType: "json",
		    data:{"endTime":$('#endTime').val(),"startTime":$('#startTime').val(),"userName":$('#userName').val()},
		    success: function (data) {
				page(data.totalPage,data.totalCount,pageNo,_clickHandler);
		       var tablehtml="";
		       console.log(data.resultcode);
			       if(data.resultcode==200){
			    	   data=data.resultlist;
			    	   if(data.length>0){
			    		   for( i=0;i<data.length;i++){
					        	tablehtml+="<tr>"+
					  		      "<td>"+data[i].userName+"</td>"+
							      "<td>"+data[i].userAddress+"</td>"+
							      "<td>"+ new Date(data[i].createTime).Format("yyyy-MM-dd")+"</td>"+
							      "<td>"+data[i].phoneNumber+"</td>"+
							      "<td>"+ chinaOrderType(data[i].userType)+"</td>"+
							      "<td><a href='/MyArtifact/order/addOrder.action?id="+data[i].id+"'  target='_blank'>修改</a></td>"+
							    "</tr>"
					        }
							$('#record-tbody').html(tablehtml);
							$('.norecord').css("display","none");
			    	   }else{
			    		   $('.norecord').css("display","block");
			    		   $('#record-tbody').html(tablehtml);
			    	   }
			       }
		    },
		    error: function (e) {/*失败后的回调函数*/
		    	alert("失败!");
		    }

		});
	}
	
	
	
	function chinaOrderType(ordertype) {
		var china="";
		switch (ordertype) {
		case "0":
			china="送单人";
			break;
		case "1":
			china="客户";
			break;
		default:
			china="客户";
			break;
		}
		return china;
	}